home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wlib11_2.zip / EXAMPLES.EXE / EXAM24.C < prev    next >
C/C++ Source or Header  |  1991-03-13  |  761b  |  25 lines

  1.   #include "window.h"
  2.   #define NORM   CREATE_VIDEO_ATTRIBUTE(black,white)
  3.   #define REVERSE CREATE_VIDEO_ATTRIBUTE(white,black)
  4.  
  5.   WPOINTER w;
  6.   char *s1 = "This string will wrap around to the next line\n";
  7.   char *s2 = "This escape code will ring the bell \a";
  8.   int i = 3;
  9.   double j = 5.6;
  10.  
  11.   main()
  12.   {
  13.     WindowInitializeSystem();
  14.     WindowSaveInitial(0);
  15.     w = WindowInitialize(BORDER,1,1,30,10,NORM,NORM,SINGLEBOX);
  16.     WindowOpen(w);
  17.     WindowDisplay(w,1,NOEFFECT);
  18.     WindowPrintfAttr(w,REVERSE,"3+2 is equal to %d\n",3+2);
  19.     GET_KEY();
  20.     WindowPrintfAttr(w,REVERSE,"i is equal to %d\nj is equal to %lf\n",i,j);
  21.     GET_KEY();
  22.     WindowPrintfAttr(w,REVERSE,s1);
  23.     GET_KEY();
  24.     WindowPrintfAttr(w,REVERSE,s2);
  25.   }